package com.linghang.wusthelpercompetition.exception;

import com.linghang.wusthelpercompetition.result.Result;
import io.swagger.v3.oas.annotations.Hidden;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

//@Hidden
//@RestControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler(RuntimeException.class)
    public Result ex(Exception ex){
        ex.printStackTrace();
        return Result.error("对不起,你的回复包含敏感词");
    }
}
